import { request } from '../../../../config/request'
import config from '../../../../config/config'

// 启用禁用
export async function updateStatus(params) {
	return request({
		url: `admin/permissionAdmin/updateState`,
		method: 'POST',
		data: params
	});
};

// 批量删除
export async function batchDelete(params) {
	return request({
		url: `admin/permissionAdmin/delete`,
		method: 'POST',
		data: params
	});
};

// 批量启用禁用
export async function batchUpdate(params) {
	return request({
		url: `admin/permissionAdmin/updateState`,
		method: 'POST',
		data: params
	});
};

// 组织管理员列表
export async function getOrganize(params) {
	return request({
		url: `${config.sysApiHeader}/v1/pearlriver/comm/role/org/get`,
		method: 'GET',
		data: params
	});
};

// 职能列表
export async function getDuty(params) {
	return request({
		url: `${config.sysApiHeader}/v1/pearlriver/comm/user/duty/list`,
		method: 'GET',
		data: params
	});
};
// 
export async function createCustomer(params) {
	return request({
		url: `admin/login/create`,
		method: 'POST',
		data: params
	});
};
//todo:接口未定
// 搜索接口
export async function search(params) {
	return request({
		url: "admin/propertyConsultant/queryFrom4A",
		method: 'POST',
		headers: {
			"Content-type": "application/json"
		},
		data: params
	});
};
//  
export async function roleList(params) {
	return request({
		url: "admin/permissionRole/listQuery",
		method: 'POST',
		headers: {
			"Content-type": "application/json"
		},
		data: params
	});
};
// admin/permissionAdmin/update
export async function update(params) {
	return request({
		url: "admin/permissionAdmin/update",
		method: 'POST',
		headers: {
			"Content-type": "application/json"
		},
		data: params
	});
};
export async function getroleList(params) {
    return request({
        url: "admin/permissionAdmin/getAllRole",
        method: 'GET',
        headers: {
            "Content-type": "application/json"
        },
        data: params
    });
};


















